package net.wds.study.dep.service.impl;

import net.wds.study.clazz.utils.PageModel;
import net.wds.study.dep.dao.DepartmentDao;
import net.wds.study.dep.entity.Department;
import net.wds.study.dep.service.DepartmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Created by gf on 2020/9/17.
 */
@Service("departmentService")
public class DepartmentServiceImpl implements DepartmentService {
    @Resource
    private DepartmentDao departmentDao;

    @Override
    public PageModel<Department> getPage(Integer statIndex, Integer pageSize, String depName, String depManger) {
        return departmentDao.getPage(statIndex, pageSize, depName, depManger);
    }

    @Override
    public boolean saveDep(Department department) {
        return departmentDao.saveDep(department);
    }

    @Override
    public boolean updateDep(Department department) {
        return departmentDao.updateDep(department);
    }

    @Override
    public boolean deleteDep(Integer id) {
        return departmentDao.deleteDep(id);
    }
}
